<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('批量选择活动')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-device-edit">

        <input name="id" th:value="${ids}" type="hidden">

        <!--选择活动-->
        <div class="form-group">
            <label class="col-sm-3 control-label">选择活动：</label>
            <div class="col-sm-8">
                <div class="input-group">
                    <input id="eventId" name="eventId" type="hidden"/>
                    <input class="form-control" type="text" onclick="selectRadioEvent()" id="eventName"
                           readonly="true">
                    <span class="input-group-addon"><i class="fa fa-search"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remarks" class="form-control"></textarea>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/device";
    $("#form-device-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/devChoseEvents", $('#form-device-edit').serialize());
        }
    }

    // 选择活动
    function selectRadioEvent() {
        var prefix = ctx + "system/event";
        $.modal.open("选择活动", prefix + "/choiceEvents");
    }

</script>
</body>
</html>